package week4;

/**
 * Created by dell on 2017/3/17.
 */
public class Game2RPG {
    public static void main(String[] args) {
        SwordsMan swordsMan = new SwordsMan();
        swordsMan.setName("Justin");
        swordsMan.setLevel(1);
        swordsMan.setBlood(200);

        Magician magician = new Magician();
        magician.setName("Monica");
        magician.setLevel(2);
        magician.setBlood(300);

        showBlood(swordsMan);
        showBlood(magician);
    }
    /*public static void showBlood(SwordsMan swordsMan) {
        System.out.printf("%s 血量 %d%n",swordsMan.getName(), swordsMan.getBlood());
    }
    public static void showBlood(Magician magician) {
        System.out.printf("%s 血量 %d%n",magician.getName(), magician.getBlood());
    }*/
    static void showBlood(Game1 role) {
        System.out.printf("%s 血量 %d%n",role.getName(),role.getBlood());
    }
}
